//
//
//
//
//  Created by wulanzhou on 16-3-7.
//  Copyright (c) 2016年 . All rights reserved.
//

#import <Foundation/Foundation.h>
#import "WBRequestArgs.h"
#import "WBResponse.h"

@class WBRequestObj;

@protocol CZRequestObjDelegate <NSObject>
@optional
- (void)CZRequestFinished:(WBRequestObj*)requestObj resultResponse:(WBResponse *)response;
@end

@interface WBRequestObj : NSObject

@property(nonatomic,strong) WBRequestArgs *requestArgs;  //请求信息
@property(nonatomic,assign) id<CZRequestObjDelegate> delegate;
@property (atomic,copy) void (^RequestFinishedServiceManager) (WBResponse *response);
/**
 *  单例
 */
+ (WBRequestObj*)sharedInstance;

/**
 *  request请求
 *
 *  @param args        请求参数
 *  @param reqDelegate 请求结果代理
 *
 */
- (void)requestService:(WBRequestArgs*)args
              delegate:(id<CZRequestObjDelegate>)reqDelegate;

/**
 *  停止请求
 */
- (void)stopRequest;
@end
